<template>
  <!-- 编辑施工单位管理 -->
  <div>
    <div class="bread-box but20">
      <el-breadcrumb separator-class="el-icon-arrow-right">
        <el-breadcrumb-item class="btn-green" style=" color: #3DC094;" @click.native="handleBack">施工单位管理</el-breadcrumb-item>
        <el-breadcrumb-item>编辑</el-breadcrumb-item>
      </el-breadcrumb>
      <div class="top-btn-group">
        <!-- <el-button type="primary" size="mini" @click="handleSave">保存</el-button> -->
        <el-button size="mini" @click="handleBack">返回</el-button>
      </div>
    </div>
    <el-tabs v-model="activeName" type="card">
      <el-tab-pane label="基础信息" name="baseInfo">
        <base-info ref="baseInfo" :detail-data="activatedData" @goBack="handleBack" />
      </el-tab-pane>
      <el-tab-pane label="保证金管理" name="marginManagement">
        <margin-management ref="marginManagement" :detail-data="activatedData" @goBack="handleBack" />
      </el-tab-pane>
      <el-tab-pane label="日常考核" name="dailyAssessment">
        <daily-assessment ref="dailyAssessment" :detail-data="activatedData" @goBack="handleBack" />
      </el-tab-pane>
      <el-tab-pane label="变更记录" name="changeLog">
        <change-log ref="changeLog" :detail-data="activatedData" @goBack="handleBack" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import baseInfo from './component/baseInfo.vue'
import DailyAssessment from './component/dailyAssessment.vue'
import MarginManagement from './component/marginManagement.vue'
import ChangeLog from './component/changeLog.vue'
// import { queryEditData } from '@/api/constructionUnitMng'
export default {
  name: 'EditUnitMng',
  components: { baseInfo, MarginManagement, DailyAssessment, ChangeLog },
  props: {
    detailData: {
      type: [String, Object, Array],
      default: ''
    }
  },
  data() {
    return {
      activeName: 'baseInfo',
      activatedData: {}
    }
  },
  created() {
    this.activatedData.data = this.detailData.data
    this.activatedData.flag = this.detailData.flag
    // queryEditData()
  },
  activated() {},
  methods: {
    handleBack() {
      this.$emit('goBack')
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/ .el-breadcrumb__inner{
    color: $qup-color-primary;
  }
.but20{ margin-bottom: 20px;}
.el-breadcrumb__inner,.btn-green{
    color: #3DC094;
}
</style>
